import { PureComponent } from "react"
import UserInfoHoc from "./UserInfoHOC"
// 应用场景一：props的增强
class Cpn extends PureComponent {
  constructor(props) {
    super(props)
  }

  render() {
    return (
      <h1>
        类组件: {this.props.name},{this.props.banners}
      </h1>
    )
  }
}

function Fn(props) {
  return <h2>函数组件:{props.pwd}</h2>
}

export default {
  Cpn: UserInfoHoc(Cpn),
  Fn: UserInfoHoc(Fn)
}
